package thread;

import gare.Gare;

public class Voyageur extends Thread {
	
	private int		id;
	private Gare	gareDepart;
	
	public Voyageur(int id, Gare gare) {
		this.id = id;
		this.gareDepart = gare;
	}
	
	public void run() {
		this.setPriority(Thread.MAX_PRIORITY);
		gareDepart.getEspaceVente().accueillirVoyageur(this);
		
		gareDepart.getEspaceQuai().monter(this);
	}
	
	public String toString() {
		return "Voyageur[" + id + "]";
	}
}
